import { AxiosRequestConfig, AxiosResponse } from "axios";

interface MjcRequestInterceptors<T = AxiosResponse> {
  requestInterceptor?: (config: AxiosRequestConfig) => AxiosRequestConfig;
  requestInterceptorCatch?: (error: any) => any;
  responseInterceptor?: (config: T) => T;
  responseInterceptorCatch?: (config: any) => any;
}

interface MjcRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
  interceptors?: MjcRequestInterceptors<T>;
  isMessageToast?: Boolean;
}

export type { MjcRequestInterceptors, MjcRequestConfig };
